package com.yehun.exception;


import com.yehun.enums.ResultEnum;

/**
 * 自定义一次基类
 * Created by Genius on 2017/3/27 0027.
 */
public class CustomException extends Exception {

    private static final long serialVersionUID = -4032619920804462171L;

    private ResultEnum code;
    public ResultEnum getCode() {
        return code;
    }

    CustomException(ResultEnum code) {
        this.code = code;
    }

    CustomException(String message) {
        super(message);
    }

    CustomException(Throwable cause) {
        super(cause);
    }

    public CustomException(ResultEnum code, String message) {
        super(message);
        this.code = code;
    }

    CustomException(String message, Throwable cause) {
        super(message, cause);
    }


}
